package com.bw.culture.adapter

import android.content.Context
import android.view.LayoutInflater
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bw.culture.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class ImagesAdapter: BaseQuickAdapter<String, BaseViewHolder>(
    R.layout.image_item
) {
    override fun convert(holder: BaseViewHolder, item: String) {
        val imageView = holder.getView<ImageView>(R.id.ic)
        if(item == "+")
        {
            Glide.with(imageView.context).load(com.bw.common.R.drawable.add_img).into(imageView)
        }else{
            Glide.with(imageView.context).load(item).into(imageView)
        }


    }
}